<div class="slogan-unregister">
	Don't stop now - keep inviting other freelancers
</div>
<div class="space-margin-bottom">
	Inviting several freelancers greatly improve your chances of finding the right one. We found some freelancers similar
</div>
<div class="col-lg-12 col-md-12 no-padding space-margin-bottom">
<?php
	$this->load->helper('file');
	if(isset($re_invite_freelancer)){
?>
	<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 list-dev-recommendeds no-padding">
<?php
		foreach ($re_invite_freelancer->result() as $value) {
?>		<div class="col-lg-6 col-md-6 item-freelancer-recommend" data-id="<?php echo $value->uid?>">
			<div class="col-lg-4 col-md-4 no-padding">
				<img class="img-thumbnail" onclick="window.location.href='<?php echo site_url('programmer/viewProfile/'.$value->uid);?>'" title="<?php echo $value->user_name?>" style="min-height:145px" src="<?php if ($value->logo != "") echo uimage_url($value->logo); else echo image_default(); ?>">	
			</div>
			<div class="col-lg-8 col-md-8 height-invite-freelancer space-margin-bottom">
				<div class="name-invite-freelancer title-color" style="min-height:20px"><a href="<?php echo site_url('programmer/viewProfile/'.$value->uid);?>"><?php echo $value->user_name?></a></div>
				<div style="min-height:45px"><?php echo getCategoryLinks($value->user_categories)?></div>
				<div style="min-height:35px">
					<input id="preview-user" value="<?php echo $value->user_rating?>" type="number" data-star-captions="{}" data-default-caption="{rating}" disabled = "disabled" class="rating" min=0 max=5  data-size="xs" >
				</div>
				<div style="min-height:35px">
					<button class="btn btn-md btn-success" id="btn-invite-one" data-href="<?php echo site_url('userList/inviteProgrammer/'.$value->uid)?>">Invite</button>
				</div>
			</div>
		</div>
<?php
		}
?>
	</div>
<?php
	}
?>
	
</div>
<div class="list-load-more-invite"></div>
<div class="col-lg-12 col-md-12 no-padding">
	<a href="#" class="link-more-invite-freelancer">
		<label class="name-invite-freelancertitle-color" style="cursor:pointer;" > Search for more Freelancers</label>
	</a>
</div>

<?php
	// echo "<pre>";
	// print_r($re_invite_freelancer->result());
	// echo "</pre>";
?>

<div style="clear:both"></div>
<script type="text/javascript">
	$(document).ready(function(){
		$('.link-more-invite-freelancer').on('click',function(e){
			e.preventDefault();
			var array_list = [];
			var user_categories = '<?php echo $user_info["user_categories"];?>';
			var user_id_other = '<?php echo $user_info["id"];?>'
			$(".item-freelancer-recommend").each(function(){
                array_list.push($(this).attr('data-id'));
            });
            $.post(BASE_URL+"index.php/users/moreDevRecommenedInvite",{'array_list' : array_list,'user_categories_sample':user_categories,'id_other':user_id_other},function(data){
                //console.log(data);
                $('.list-load-more-invite').append(data);
            });
		})
	})
</script>
